// Learn TypeScript:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class ShellRuleLayer extends cc.Component {

    @property(cc.Node)
    rummy: cc.Node = null;
    @property(cc.Node)
    slot: cc.Node = null;
    @property(cc.Node)
    texas: cc.Node = null;
    @property(cc.Node)
    spider: cc.Node = null;


    // onLoad () {}

    start () {
        let sceneName = cc.director.getScene().name;
        switch(sceneName){
            case "Rummy":
                this.rummy.active = true;
                break;
            case "ShellSlot":
                this.slot.active = true;
                break;
            case "Solitaire":
                this.spider.active = true;
                break;
            case "TexasPoker":
                this.texas.active = true;
                break;
        }
    }
    private closeClick(){
        this.node.removeFromParent();
        this.node.destroy();
    }
    // update (dt) {}
}
